:root {
	--cf-orange: #f6821f;
	--cf-orange-dark: #eb7a1c;
	--cf-orange-light: #ff9a3c;
	--cf-blue: #2c7cb0;
	--cf-blue-dark: #205f85;
	--cf-gray-dark: #404040;
	--cf-gray: #737373;
	--cf-gray-light: #f2f2f2;
	--cf-red: #e74c3c;
	--cf-green: #2ecc71;
	--cf-white: #ffffff;
	--box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--spacing: 20px;
	--border-radius: 4px;
	--font-main:
		system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

/* Base styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font-main);
	background-color: var(--cf-gray-light);
	color: var(--cf-gray-dark);
	line-height: 1.5;
	padding: 2rem 0;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin-bottom: 0.5rem;
	font-weight: 600;
	line-height: 1.2;
}

h1 {
	font-size: 1.75rem;
}

h2 {
	font-size: 1.5rem;
}

a {
	color: var(--cf-blue);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Logo styling */
.logo {
	letter-spacing: 0.65em;
	text-transform: uppercase;
	font-weight: bold;
	font-size: 1.5rem;
	margin: 0;
}

.logo a {
	color: var(--cf-orange);
	text-decoration: none;
}

.logo a:hover {
	color: var(--cf-orange-dark);
}

.subtitle {
	color: var(--cf-gray);
	font-size: 1rem;
	margin-left: 0.5rem;
}

/* Header */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--spacing);
}

.description {
	font-size: 0.875rem;
	color: var(--cf-gray);
	padding-bottom: 2rem;
}

.logo-container {
	display: flex;
	align-items: baseline;
}

/* Tabs */
.tabs {
	display: flex;
	margin-bottom: var(--spacing);
	border-bottom: 1px solid var(--cf-gray);
}

.tab-btn {
	padding: 10px 20px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-weight: 500;
	color: var(--cf-gray);
}

.tab-btn.active {
	color: var(--cf-orange);
	border-bottom-color: var(--cf-orange);
}

.tab-content {
	margin-bottom: var(--spacing);
}

.action-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--spacing);
}

.filter-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Buttons */
.btn {
	display: inline-block;
	font-weight: 500;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid transparent;
	padding: 0.5rem 1rem;
	font-size: 1rem;
	line-height: 1.5;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: all 0.15s ease-in-out;
}

.btn.small {
	padding: 0.25rem 0.5rem;
	font-size: 0.875rem;
}

.btn.primary {
	color: var(--cf-white);
	background-color: var(--cf-orange);
	border-color: var(--cf-orange);
}

.btn.primary:hover {
	background-color: var(--cf-orange-dark);
	border-color: var(--cf-orange-dark);
}

.btn.secondary {
	color: var(--cf-gray-dark);
	background-color: var(--cf-white);
	border-color: var(--cf-gray);
}

.btn.secondary:hover {
	background-color: var(--cf-gray-light);
}

.btn.danger {
	color: var(--cf-white);
	background-color: var(--cf-gray-dark);
	border-color: var(--cf-gray-dark);
}

.btn.danger:hover {
	opacity: 0.9;
}

/* Cards */
.card {
	background-color: var(--cf-white);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	margin-bottom: var(--spacing);
	overflow: hidden;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--spacing);
}

.table-card {
	background-color: var(--cf-white);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	margin-bottom: var(--spacing);
	padding: var(--spacing);
	transition:
		transform 0.2s,
		box-shadow 0.2s;
	cursor: pointer;
	display: block;
}

.table-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.table-card h3 {
	color: var(--cf-orange);
	margin-bottom: 0.5rem;
}

.table-card-footer {
	display: flex;
	justify-content: space-between;
	margin-top: var(--spacing);
}

/* Tables */
.table-container {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--cf-gray-light);
}

th {
	background-color: rgba(246, 130, 31, 0.05);
	font-weight: 600;
}

th.id-column {
	color: var(--cf-blue);
}

tr:nth-child(even) {
	background-color: rgba(246, 130, 31, 0.02);
}

tr:hover {
	background-color: rgba(246, 130, 31, 0.05);
}

.actions-column {
	white-space: nowrap;
	text-align: right;
}

/* Detail view header */
.detail-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--spacing);
}

.detail-header h2 {
	margin-bottom: 0;
}

.actions {
	display: flex;
	gap: 0.5rem;
}

/* Modals */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	overflow: auto;
}

.modal.show {
	display: block;
}

.modal-content {
	background-color: var(--cf-white);
	margin: 10% auto;
	padding: var(--spacing);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	max-width: 600px;
	animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--spacing);
	border-bottom: 1px solid var(--cf-gray-light);
	padding-bottom: 1rem;
}

.modal-title {
	margin-bottom: 0;
	font-weight: 600;
	color: var(--cf-orange);
}

.close-btn {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--cf-gray);
}

.modal-body {
	margin-bottom: var(--spacing);
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	border-top: 1px solid var(--cf-gray-light);
	padding-top: var(--spacing);
}

/* Forms */
.form-group {
	margin-bottom: var(--spacing);
}

label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
	display: block;
	width: 100%;
	padding: 0.5rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--cf-gray-dark);
	background-color: var(--cf-white);
	background-clip: padding-box;
	border: 1px solid var(--cf-gray);
	border-radius: var(--border-radius);
	transition:
		border-color 0.15s ease-in-out,
		box-shadow 0.15s ease-in-out;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
	border-color: var(--cf-orange);
	outline: 0;
	box-shadow: 0 0 0 0.2rem rgba(246, 130, 31, 0.25);
}

input[readonly] {
	background-color: var(--cf-gray-light);
	cursor: not-allowed;
}

.row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -10px;
	margin-left: -10px;
}

.col {
	flex: 1;
	padding: 0 10px;
}

/* Info box */
.info-box {
	background-color: rgba(246, 130, 31, 0.05);
	border-left: 4px solid var(--cf-orange);
	border-radius: var(--border-radius);
	padding: 15px;
	margin-bottom: var(--spacing);
}

.info-box h6 {
	color: var(--cf-orange);
	margin-top: 0;
}

.info-box ul {
	margin-bottom: 0;
	padding-left: 20px;
}

/* Column row styling */
.column-row {
	display: flex;
	align-items: center;
	padding: 10px;
	border-radius: var(--border-radius);
	background-color: var(--cf-gray-light);
	margin-bottom: 8px;
}

.default-column {
	padding: 10px;
	border-radius: var(--border-radius);
	background-color: var(--cf-gray-light);
	margin-bottom: 15px;
}

.badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 10px;
	background-color: var(--cf-gray);
	color: var(--cf-white);
}

.badge.primary {
	background-color: var(--cf-orange);
}

/* Error message */
.error-message {
	color: var(--cf-red);
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* Toast notifications */
.toast-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 1050;
}

.toast {
	display: none;
	position: relative;
	max-width: 350px;
	background-color: var(--cf-orange);
	color: var(--cf-white);
	border-radius: var(--border-radius);
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.toast.show {
	display: block;
	animation: toastFadeIn 0.3s;
}

@keyframes toastFadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.toast-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem;
}

.toast-content .close-btn {
	font-size: 1rem;
	color: var(--cf-white);
}

/* Utility classes */
.hidden {
	display: none !important;
}

.empty-state {
	text-align: center;
	padding: 3rem 1rem;
	background-color: var(--cf-white);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
}

.empty-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

/* Making the UI responsive */
@media (max-width: 768px) {
	header {
		flex-direction: column;
		align-items: flex-start;
	}

	header .btn {
		margin-top: 1rem;
		align-self: flex-start;
	}

	.detail-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.detail-header .actions {
		margin-top: 0.5rem;
	}

	.modal-content {
		margin: 20% auto;
		width: 90%;
	}

	.column-row {
		flex-direction: column;
	}

	.column-row > div {
		width: 100%;
		margin-bottom: 0.5rem;
	}

	.tabs {
		width: 100%;
	}

	.tab-btn {
		flex: 1;
		text-align: center;
	}

	.action-bar {
		flex-direction: column;
		gap: 10px;
	}

	.filter-container {
		width: 100%;
	}
}

/* Add these new styles for the loading indicator */

.loading-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 1rem;
	background-color: var(--cf-white);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	text-align: center;
}

.loading-container p {
	margin-top: 1rem;
	color: var(--cf-gray);
}

.spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(246, 130, 31, 0.3);
	border-radius: 50%;
	border-top-color: var(--cf-orange);
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Add this to your existing styles.css file */

#loadingView {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000;
	background-color: rgba(255, 255, 255, 0.9);
	transition: opacity 0.3s ease-out;
}
